package com.scaffold.service;

import com.scaffold.param.HelloParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@FeignClient(name = "service-demo-func", fallback = com.scaffold.service.impl.HelloFeignClientHystrix.class)
public interface HelloFeignClient {

    @GetMapping(value = "/sayHi")
    String sayHi();

    @PostMapping(value = "/sayHello")
    String sayHello(@SpringQueryMap @Valid HelloParam hello);

    @PostMapping("/sayHelloTwo")
    String sayHelloTwo(@RequestParam("id") int id, @RequestParam("message") String message);

}
